$def with (articles, tag_list, recent_posts, month_list, curr_page, page_count, cate_list, blog_rolls)
$var title: Michael's Blog

<div id="content" class="narrowcolumn">

$for article in articles:
  <div class="post">
  <h2><a title=$article.title href="../view/$article.id">$article.title</a></h2>
  <small>$article.published_when.strftime("%Y/%m/%d")</small>
  <div class="entry">
  $article.body
  </div>
  <p class="postmetadata">Tags: 
  $for cate in article.tags:
    <a href="../tag/$cate">$cate</a> 
  | <a href="../view/$article.id">$article.total_comment() Comment</a>
  </div>

<div class="navigation">
$if curr_page <= 1:
    <div class="alignleft">&nbsp;</div>
$else:
    <div class="alignleft">&laquo;<a href="../page/${curr_page-1}">newer_posts</a></div>
$if curr_page >= page_count:
    <div class="alignright">&nbsp;</div>
$else:
    <div class="alignright">&raquo;<a href="../page/${curr_page+1}">older posts</a></div>
</div>

</div>

<div id="sidebar">
<ul>
            <li>
              <form method="get" id="searchform" action="/search">
<label class="hidden" for="s">Search for:</label>
<div><input type="text" value="" name="s" id="s" />
<input type="submit" id="searchsubmit" value="Search" />
</div>
</form>
      </li>

<li><h2>Tags</h2>
$if tag_list:
    <div id="tag-cloud">
    $for tag_count in tag_list:
        <a class="$tag_count.css_class" href="../tag/$tag_count.tag">$(tag_count.tag)($tag_count.count)</a>
        $if not loop.last:
            ,
    </div>
 
</li>

<li class="categories"><h2>Categories</h2>
$if cate_list:
  <ul>
  $for cate in cate_list:
    <li class="cat_item"><a href="../cat/$cate">$cate</a></li>
  </ul>
</li>

<li id="linkcat-2" class="linkcat"><h2>Blogroll</h2>
$if blog_rolls:
  <ul class="xoxo blogroll">
  $for roll in blog_rolls:
    <li><a href="http://solidot.org">$roll</a></li>
  </ul>
</li>

<li><h2>Archive</h2>
$if month_list:
  <ul>
    $for month in month_list:
      <li><a href="../date/$month.date.strftime('%Y-%m')">$month.date.strftime('%Y-%m')</a> ($month.count)</li>
  </ul>
</li>

<li><h2>Meta</h2>
<ul>
$if session.login is False:
    <LI><A HREF="/login">login</A></LI>
$else:
    <LI><A HREF="/add">write blog</A></LI>
    <LI><A HREF="/manage">manage blog</A></LI>
    <LI><A HREF="/logout">logout</A></LI>
</ul>
</li>

</ul>

</div>
<hr />
